var a = require("../../../@babel/runtime/helpers/defineProperty"), t = getApp();

Component({
    properties: {
        active: {
            type: Number,
            value: 0
        },
        listData: {
            type: null
        }
    },
    data: {
        list: [ "全部", "进行中", "众筹成功", "众筹失败" ],
        index: 0,
        payShow: !1,
        allUserShowList: [],
        allUserpage: 1,
        payId: ""
    },
    observers: {
        active: function(a) {
            a && this.setData({
                index: 0
            });
        }
    },
    methods: {
        closePayShow: function() {
            this.setData({
                payShow: !1
            });
        },
        payShowTap: function(e) {
            var i = this, s = e.currentTarget.dataset.booleans, r = e.currentTarget.dataset.id;
            1 == s ? (console.log(this.data.allUserShowList), this.data.allUserpage = this.data.allUserpage + 1) : this.data.payId = r;
            var d = {
                page: this.data.allUserpage,
                activity_member_id: r
            }, o = t.getNetAddresss("plugin.crowdfunding.frontend.activity-order.memberRecords");
            t._getNetWork({
                url: o,
                data: d,
                success: function(t) {
                    var e = t.data;
                    1 == e.result && (i.setData({
                        payShow: !0
                    }), 1 == s ? e.data.data.length > 0 && i.setData(a({}, "allUserShowList.data", i.data.allUserShowList.data.concat(e.data.data))) : i.setData({
                        allUserShowList: e.data
                    }));
                },
                fail: function(a) {
                    console.log(a);
                }
            });
        },
        toUrl: function(a) {
            var t = a.currentTarget.dataset.id, e = a.currentTarget.dataset.aid;
            0 == this.data.active ? wx.navigateTo({
                url: "/packageF/crowd_activity/goods/goods?id=" + e
            }) : wx.navigateTo({
                url: "/packageF/crowd_activity/funding/funding?id=" + t
            });
        },
        handle: function(a) {
            console.log(a), this.setData({
                index: a.currentTarget.dataset.index
            }), this.triggerEvent("childIndex", this.data.index);
        }
    }
});